package org.budo.graph.service.util;

import java.lang.management.ThreadInfo;

import org.budo.support.lang.util.ProcessUtil;
import org.budo.support.lang.util.StringUtil;
import org.springframework.context.ApplicationContext;

/**
 * @author lmw
 */
public class ThreadInfoUtil {
    public static String writeThreadInfoResponse(ApplicationContext applicationContext, String url) {
        ThreadInfo[] threadInfos = ProcessUtil.getThreadInfos(Integer.MAX_VALUE);
        return "<pre>" + StringUtil.join(threadInfos) + "</pre>";
    }
}